package com.sdd.plains;

public class CartItem {
        private ProductPlain product;
        private int quantity;
        
        public CartItem(ProductPlain product) {
            this.product = product;
            quantity=1;
        }
        
        public ProductPlain getProduct() {
            return product;
        }

        public int getQuantity() {
            return quantity;
        }

        public void setQuantity(int quantity) {
            this.quantity = quantity;
        }

        @Override
        public boolean equals(Object obj) {
            return product.equals(obj);
        }

        @Override
        public String toString() {
            return product.toString();
        }
        
    }